3.663 \(\int \frac {(a+b \tan (c+d x))^n (A+B \tan (c+d x))}{\sqrt {\tan (c+d x)}} \, dx\)

Optimal. Leaf size=167 \[ \frac {(A+i B) \sqrt {\tan (c+d x)} (a+b \tan (c+d x))^n \left (\frac {b \tan (c+d x)}{a}+1\right )^{-n} F_1\left (\frac {1}{2};1,-n;\frac {3}{2};-i \tan (c+d x),-\frac {b \tan (c+d x)}{a}\right )}{d}+\frac {(A-i B) \sqrt {\tan (c+d x)} (a+b \tan (c+d x))^n \left (\frac {b \tan (c+d x)}{a}+1\right )^{-n} F_1\left (\frac {1}{2};1,-n;\frac {3}{2};i \tan (c+d x),-\frac {b \tan (c+d x)}{a}\right )}{d} \]

[Out]

(A+I*B)*AppellF1(1/2,1,-n,3/2,-I*tan(d*x+c),-b*tan(d*x+c)/a)*tan(d*x+c)^(1/2)*(a+b*tan(d*x+c))^n/d/((1+b*tan(d
*x+c)/a)^n)+(A-I*B)*AppellF1(1/2,1,-n,3/2,I*tan(d*x+c),-b*tan(d*x+c)/a)*tan(d*x+c)^(1/2)*(a+b*tan(d*x+c))^n/d/
((1+b*tan(d*x+c)/a)^n)

________________________________________________________________________________________

Rubi [A]  time = 0.33, antiderivative size = 167, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 5, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.152, Rules used = {3603, 3602, 130, 430, 429} \[ \frac {(A+i B) \sqrt {\tan (c+d x)} (a+b \tan (c+d x))^n \left (\frac {b \tan (c+d x)}{a}+1\right )^{-n} F_1\left (\frac {1}{2};1,-n;\frac {3}{2};-i \tan (c+d x),-\frac {b \tan (c+d x)}{a}\right )}{d}+\frac {(A-i B) \sqrt {\tan (c+d x)} (a+b \tan (c+d x))^n \left (\frac {b \tan (c+d x)}{a}+1\right )^{-n} F_1\left (\frac {1}{2};1,-n;\frac {3}{2};i \tan (c+d x),-\frac {b \tan (c+d x)}{a}\right )}{d} \]

Antiderivative was successfully verified.

[In]

Int[((a + b*Tan[c + d*x])^n*(A + B*Tan[c + d*x]))/Sqrt[Tan[c + d*x]],x]

[Out]

((A + I*B)*AppellF1[1/2, 1, -n, 3/2, (-I)*Tan[c + d*x], -((b*Tan[c + d*x])/a)]*Sqrt[Tan[c + d*x]]*(a + b*Tan[c
 + d*x])^n)/(d*(1 + (b*Tan[c + d*x])/a)^n) + ((A - I*B)*AppellF1[1/2, 1, -n, 3/2, I*Tan[c + d*x], -((b*Tan[c +
 d*x])/a)]*Sqrt[Tan[c + d*x]]*(a + b*Tan[c + d*x])^n)/(d*(1 + (b*Tan[c + d*x])/a)^n)

Rule 130

Int[((e_.)*(x_))^(p_)*((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> With[{k = Denominator[p]
}, Dist[k/e, Subst[Int[x^(k*(p + 1) - 1)*(a + (b*x^k)/e)^m*(c + (d*x^k)/e)^n, x], x, (e*x)^(1/k)], x]] /; Free
Q[{a, b, c, d, e, m, n}, x] && NeQ[b*c - a*d, 0] && FractionQ[p] && IntegerQ[m]

Rule 429

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Simp[a^p*c^q*x*AppellF1[1/n, -p,
 -q, 1 + 1/n, -((b*x^n)/a), -((d*x^n)/c)], x] /; FreeQ[{a, b, c, d, n, p, q}, x] && NeQ[b*c - a*d, 0] && NeQ[n
, -1] && (IntegerQ[p] || GtQ[a, 0]) && (IntegerQ[q] || GtQ[c, 0])

Rule 430

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Dist[(a^IntPart[p]*(a + b*x^n)^F
racPart[p])/(1 + (b*x^n)/a)^FracPart[p], Int[(1 + (b*x^n)/a)^p*(c + d*x^n)^q, x], x] /; FreeQ[{a, b, c, d, n,
p, q}, x] && NeQ[b*c - a*d, 0] && NeQ[n, -1] &&  !(IntegerQ[p] || GtQ[a, 0])

Rule 3602

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_
.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[A^2/f, Subst[Int[((a + b*x)^m*(c + d*x)^n)/(A - B*x), x], x, Tan[e +
 f*x]], x] /; FreeQ[{a, b, c, d, e, f, A, B, m, n}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] &&  !IntegerQ
[m] &&  !IntegerQ[n] &&  !IntegersQ[2*m, 2*n] && EqQ[A^2 + B^2, 0]

Rule 3603

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e
_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[(A + I*B)/2, Int[(a + b*Tan[e + f*x])^m*(c + d*Tan[e + f*x])^n*(1 -
 I*Tan[e + f*x]), x], x] + Dist[(A - I*B)/2, Int[(a + b*Tan[e + f*x])^m*(c + d*Tan[e + f*x])^n*(1 + I*Tan[e +
f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, A, B, m, n}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] &&  !Integ
erQ[m] &&  !IntegerQ[n] &&  !IntegersQ[2*m, 2*n] && NeQ[A^2 + B^2, 0]

Rubi steps

\begin {align*} \int \frac {(a+b \tan (c+d x))^n (A+B \tan (c+d x))}{\sqrt {\tan (c+d x)}} \, dx &=\frac {1}{2} (A-i B) \int \frac {(1+i \tan (c+d x)) (a+b \tan (c+d x))^n}{\sqrt {\tan (c+d x)}} \, dx+\frac {1}{2} (A+i B) \int \frac {(1-i \tan (c+d x)) (a+b \tan (c+d x))^n}{\sqrt {\tan (c+d x)}} \, dx\\ &=\frac {(A-i B) \operatorname {Subst}\left (\int \frac {(a+b x)^n}{(1-i x) \sqrt {x}} \, dx,x,\tan (c+d x)\right )}{2 d}+\frac {(A+i B) \operatorname {Subst}\left (\int \frac {(a+b x)^n}{(1+i x) \sqrt {x}} \, dx,x,\tan (c+d x)\right )}{2 d}\\ &=\frac {(A-i B) \operatorname {Subst}\left (\int \frac {\left (a+b x^2\right )^n}{1-i x^2} \, dx,x,\sqrt {\tan (c+d x)}\right )}{d}+\frac {(A+i B) \operatorname {Subst}\left (\int \frac {\left (a+b x^2\right )^n}{1+i x^2} \, dx,x,\sqrt {\tan (c+d x)}\right )}{d}\\ &=\frac {\left ((A-i B) (a+b \tan (c+d x))^n \left (1+\frac {b \tan (c+d x)}{a}\right )^{-n}\right ) \operatorname {Subst}\left (\int \frac {\left (1+\frac {b x^2}{a}\right )^n}{1-i x^2} \, dx,x,\sqrt {\tan (c+d x)}\right )}{d}+\frac {\left ((A+i B) (a+b \tan (c+d x))^n \left (1+\frac {b \tan (c+d x)}{a}\right )^{-n}\right ) \operatorname {Subst}\left (\int \frac {\left (1+\frac {b x^2}{a}\right )^n}{1+i x^2} \, dx,x,\sqrt {\tan (c+d x)}\right )}{d}\\ &=\frac {(A+i B) F_1\left (\frac {1}{2};1,-n;\frac {3}{2};-i \tan (c+d x),-\frac {b \tan (c+d x)}{a}\right ) \sqrt {\tan (c+d x)} (a+b \tan (c+d x))^n \left (1+\frac {b \tan (c+d x)}{a}\right )^{-n}}{d}+\frac {(A-i B) F_1\left (\frac {1}{2};1,-n;\frac {3}{2};i \tan (c+d x),-\frac {b \tan (c+d x)}{a}\right ) \sqrt {\tan (c+d x)} (a+b \tan (c+d x))^n \left (1+\frac {b \tan (c+d x)}{a}\right )^{-n}}{d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [F]  time = 1.21, size = 0, normalized size = 0.00 \[ \int \frac {(a+b \tan (c+d x))^n (A+B \tan (c+d x))}{\sqrt {\tan (c+d x)}} \, dx \]

Verification is Not applicable to the result.

[In]

Integrate[((a + b*Tan[c + d*x])^n*(A + B*Tan[c + d*x]))/Sqrt[Tan[c + d*x]],x]

[Out]

Integrate[((a + b*Tan[c + d*x])^n*(A + B*Tan[c + d*x]))/Sqrt[Tan[c + d*x]], x]

________________________________________________________________________________________

fricas [F]  time = 0.94, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {{\left (B \tan \left (d x + c\right ) + A\right )} {\left (b \tan \left (d x + c\right ) + a\right )}^{n}}{\sqrt {\tan \left (d x + c\right )}}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*tan(d*x+c))^n*(A+B*tan(d*x+c))/tan(d*x+c)^(1/2),x, algorithm="fricas")

[Out]

integral((B*tan(d*x + c) + A)*(b*tan(d*x + c) + a)^n/sqrt(tan(d*x + c)), x)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (B \tan \left (d x + c\right ) + A\right )} {\left (b \tan \left (d x + c\right ) + a\right )}^{n}}{\sqrt {\tan \left (d x + c\right )}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*tan(d*x+c))^n*(A+B*tan(d*x+c))/tan(d*x+c)^(1/2),x, algorithm="giac")

[Out]

integrate((B*tan(d*x + c) + A)*(b*tan(d*x + c) + a)^n/sqrt(tan(d*x + c)), x)

________________________________________________________________________________________

maple [F]  time = 1.38, size = 0, normalized size = 0.00 \[ \int \frac {\left (a +b \tan \left (d x +c \right )\right )^{n} \left (A +B \tan \left (d x +c \right )\right )}{\sqrt {\tan \left (d x +c \right )}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*tan(d*x+c))^n*(A+B*tan(d*x+c))/tan(d*x+c)^(1/2),x)

[Out]

int((a+b*tan(d*x+c))^n*(A+B*tan(d*x+c))/tan(d*x+c)^(1/2),x)

________________________________________________________________________________________

maxima [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*tan(d*x+c))^n*(A+B*tan(d*x+c))/tan(d*x+c)^(1/2),x, algorithm="maxima")

[Out]

Timed out

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {\left (A+B\,\mathrm {tan}\left (c+d\,x\right )\right )\,{\left (a+b\,\mathrm {tan}\left (c+d\,x\right )\right )}^n}{\sqrt {\mathrm {tan}\left (c+d\,x\right )}} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((A + B*tan(c + d*x))*(a + b*tan(c + d*x))^n)/tan(c + d*x)^(1/2),x)

[Out]

int(((A + B*tan(c + d*x))*(a + b*tan(c + d*x))^n)/tan(c + d*x)^(1/2), x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (A + B \tan {\left (c + d x \right )}\right ) \left (a + b \tan {\left (c + d x \right )}\right )^{n}}{\sqrt {\tan {\left (c + d x \right )}}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*tan(d*x+c))**n*(A+B*tan(d*x+c))/tan(d*x+c)**(1/2),x)

[Out]

Integral((A + B*tan(c + d*x))*(a + b*tan(c + d*x))**n/sqrt(tan(c + d*x)), x)

________________________________________________________________________________________